<?xml version='1.0' encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <link href="cpip.css" rel="stylesheet" type="text/css" />
    <title>File: /Users/paulross/dev/linux/linux-3.13/include/linux/sysfs.h</title>
  </head>
  <body>
    <h1>File: /Users/paulross/dev/linux/linux-3.13/include/linux/sysfs.h</h1>
    <p>Green shading in the line number column
means the source is part of the translation unit, red means it is conditionally excluded.
Highlighted line numbers link to the translation unit page. Highlighted macros link to
the macro page.</p>
    <pre><a name="1" /><span class="True">       1:</span> <span class="k">/*</span>
<a name="2" /><span class="True">       2:</span> <span class="k"> * sysfs.h - definitions for the device driver filesystem</span>
<a name="3" /><span class="True">       3:</span> <span class="k"> *</span>
<a name="4" /><span class="True">       4:</span> <span class="k"> * Copyright (c) 2001,2002 Patrick Mochel</span>
<a name="5" /><span class="True">       5:</span> <span class="k"> * Copyright (c) 2004 Silicon Graphics, Inc.</span>
<a name="6" /><span class="True">       6:</span> <span class="k"> * Copyright (c) 2007 SUSE Linux Products GmbH</span>
<a name="7" /><span class="True">       7:</span> <span class="k"> * Copyright (c) 2007 Tejun Heo &lt;teheo@suse.de&gt;</span>
<a name="8" /><span class="True">       8:</span> <span class="k"> *</span>
<a name="9" /><span class="True">       9:</span> <span class="k"> * Please see Documentation/filesystems/sysfs.txt for more information.</span>
<a name="10" /><span class="True">      10:</span> <span class="k"> */</span>
<a name="11" /><span class="True">      11:</span> 
<a name="12" /><span class="True">      12:</span> <span class="f">#</span><span class="n">ifndef</span> <a href="cpu.c_macros_noref.html#_X1NZU0ZTX0hfXzA_"><span class="b">_SYSFS_H_</span></a>
<a name="13" /><span class="True">      13:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_X1NZU0ZTX0hfXzA_"><span class="b">_SYSFS_H_</span></a>
<a name="14" /><span class="True">      14:</span> 
<a name="15" /><span class="True">      15:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">compiler</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="16" /><span class="True">      16:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">errno</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="17" /><span class="True">      17:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">list</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="18" /><span class="True">      18:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">lockdep</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="19" /><span class="True">      19:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">kobject_ns</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="20" /><span class="True">      20:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">stat</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="21" /><span class="True">      21:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">atomic</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="22" /><span class="True">      22:</span> 
<a name="23" /><span class="True">      23:</span> <span class="m">struct</span> <span class="b">kobject</span><span class="f">;</span>
<a name="24" /><span class="True">      24:</span> <span class="m">struct</span> <span class="b">module</span><span class="f">;</span>
<a name="25" /><span class="True">      25:</span> <span class="m">struct</span> <span class="b">bin_attribute</span><span class="f">;</span>
<a name="26" /><span class="True">      26:</span> <span class="m">enum</span> <span class="b">kobj_ns_type</span><span class="f">;</span>
<a name="27" /><span class="True">      27:</span> 
<a name="28" /><span class="True">      28:</span> <span class="m">struct</span> <span class="b">attribute</span> <span class="f">{</span>
<a name="29" /><span class="True">      29:</span>     <span class="m">const</span> <span class="m">char</span>        <span class="f">*</span><span class="b">name</span><span class="f">;</span>
<a name="30" /><span class="True">      30:</span>     <span class="b">umode_t</span>            <span class="b">mode</span><span class="f">;</span>
<a name="31" /><span class="False">      31:</span> <span class="f">#</span><span class="n">ifdef</span> <span class="b">CONFIG_DEBUG_LOCK_ALLOC</span>
<a name="32" /><span class="False">      32:</span>     <span class="m">bool</span>            <span class="b">ignore_lockdep</span><span class="f">:</span><span class="c">1</span><span class="f">;</span>
<a name="33" /><span class="False">      33:</span>     <span class="m">struct</span> <span class="b">lock_class_key</span>    <span class="f">*</span><span class="b">key</span><span class="f">;</span>
<a name="34" /><span class="False">      34:</span>     <span class="m">struct</span> <span class="b">lock_class_key</span>    <span class="b">skey</span><span class="f">;</span>
<a name="35" /><span class="True">      35:</span> <span class="f">#</span><span class="n">endif</span>
<a name="36" /><span class="True">      36:</span> <span class="f">}</span><span class="f">;</span>
<a name="37" /><span class="True">      37:</span> 
<a name="38" /><span class="True">      38:</span> <span class="k">/**</span>
<a name="39" /><span class="True">      39:</span> <span class="k"> *    sysfs_attr_init - initialize a dynamically allocated sysfs attribute</span>
<a name="40" /><span class="True">      40:</span> <span class="k"> *    @attr: struct attribute to initialize</span>
<a name="41" /><span class="True">      41:</span> <span class="k"> *</span>
<a name="42" /><span class="True">      42:</span> <span class="k"> *    Initialize a dynamically allocated struct attribute so we can</span>
<a name="43" /><span class="True">      43:</span> <span class="k"> *    make lockdep happy.  This is a new requirement for attributes</span>
<a name="44" /><span class="True">      44:</span> <span class="k"> *    and initially this is only needed when lockdep is enabled.</span>
<a name="45" /><span class="True">      45:</span> <span class="k"> *    Lockdep gives a nice error when your attribute is added to</span>
<a name="46" /><span class="True">      46:</span> <span class="k"> *    sysfs if you don&apos;t have this.</span>
<a name="47" /><span class="True">      47:</span> <span class="k"> */</span>
<a name="48" /><span class="False">      48:</span> <span class="f">#</span><span class="n">ifdef</span> <span class="b">CONFIG_DEBUG_LOCK_ALLOC</span>
<a name="49" /><span class="False">      49:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_c3lzZnNfYXR0cl9pbml0XzA_"><span class="b">sysfs_attr_init</span></a><span class="f">(</span><span class="b">attr</span><span class="f">)</span>                \
<a name="50" /><span class="False">      50:</span> <span class="m">do</span> <span class="f">{</span>                            \
<a name="51" /><span class="False">      51:</span>     <span class="m">static</span> <span class="m">struct</span> <span class="b">lock_class_key</span> <span class="b">__key</span><span class="f">;</span>        \
<a name="52" /><span class="False">      52:</span>                             \
<a name="53" /><span class="False">      53:</span>     <span class="f">(</span><span class="b">attr</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">key</span> <span class="f">=</span> <span class="f">&amp;</span><span class="b">__key</span><span class="f">;</span>                \
<a name="54" /><span class="False">      54:</span> <span class="f">}</span> <span class="m">while</span> <span class="f">(</span><span class="c">0</span><span class="f">)</span>
<a name="55" /><span class="True">      55:</span> <span class="f">#</span><span class="n">else</span>
<a name="56" /><span class="True">      56:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_c3lzZnNfYXR0cl9pbml0XzA_"><span class="b">sysfs_attr_init</span></a><span class="f">(</span><span class="b">attr</span><span class="f">)</span> <span class="m">do</span> <span class="f">{</span><span class="f">}</span> <span class="m">while</span> <span class="f">(</span><span class="c">0</span><span class="f">)</span>
<a name="57" /><span class="True">      57:</span> <span class="f">#</span><span class="n">endif</span>
<a name="58" /><span class="True">      58:</span> 
<a name="59" /><span class="True">      59:</span> <span class="m">struct</span> <span class="b">attribute_group</span> <span class="f">{</span>
<a name="60" /><span class="True">      60:</span>     <span class="m">const</span> <span class="m">char</span>        <span class="f">*</span><span class="b">name</span><span class="f">;</span>
<a name="61" /><span class="True">      61:</span>     <span class="b">umode_t</span>            <span class="f">(</span><span class="f">*</span><span class="b">is_visible</span><span class="f">)</span><span class="f">(</span><span class="m">struct</span> <span class="b">kobject</span> <span class="f">*</span><span class="f">,</span>
<a name="62" /><span class="True">      62:</span>                           <span class="m">struct</span> <span class="b">attribute</span> <span class="f">*</span><span class="f">,</span> <span class="m">int</span><span class="f">)</span><span class="f">;</span>
<a name="63" /><span class="True">      63:</span>     <span class="m">struct</span> <span class="b">attribute</span>    <span class="f">*</span><span class="f">*</span><span class="b">attrs</span><span class="f">;</span>
<a name="64" /><span class="True">      64:</span>     <span class="m">struct</span> <span class="b">bin_attribute</span>    <span class="f">*</span><span class="f">*</span><span class="b">bin_attrs</span><span class="f">;</span>
<a name="65" /><span class="True">      65:</span> <span class="f">}</span><span class="f">;</span>
<a name="66" /><span class="True">      66:</span> 
<a name="67" /><span class="True">      67:</span> <span class="k">/**</span>
<a name="68" /><span class="True">      68:</span> <span class="k"> * Use these macros to make defining attributes easier. See include/linux/device.h</span>
<a name="69" /><span class="True">      69:</span> <span class="k"> * for examples..</span>
<a name="70" /><span class="True">      70:</span> <span class="k"> */</span>
<a name="71" /><span class="True">      71:</span> 
<a name="72" /><span class="True">      72:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_X19BVFRSXzA_"><span class="b">__ATTR</span></a><span class="f">(</span><span class="b">_name</span><span class="f">,</span> <span class="b">_mode</span><span class="f">,</span> <span class="b">_show</span><span class="f">,</span> <span class="b">_store</span><span class="f">)</span> <span class="f">{</span>                \
<a name="73" /><span class="True">      73:</span>     <span class="f">.</span><span class="b">attr</span> <span class="f">=</span> <span class="f">{</span><span class="f">.</span><span class="b">name</span> <span class="f">=</span> <a href="cpu.c_macros_ref.html#_X19zdHJpbmdpZnlfMA__"><span class="b">__stringify</span></a><span class="f">(</span><span class="b">_name</span><span class="f">)</span><span class="f">,</span> <span class="f">.</span><span class="b">mode</span> <span class="f">=</span> <span class="b">_mode</span> <span class="f">}</span><span class="f">,</span>        \
<a name="74" /><span class="True">      74:</span>     <span class="f">.</span><span class="b">show</span>    <span class="f">=</span> <span class="b">_show</span><span class="f">,</span>                        \
<a name="75" /><span class="True">      75:</span>     <span class="f">.</span><span class="b">store</span>    <span class="f">=</span> <span class="b">_store</span><span class="f">,</span>                        \
<a name="76" /><span class="True">      76:</span> <span class="f">}</span>
<a name="77" /><span class="True">      77:</span> 
<a name="78" /><span class="True">      78:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_X19BVFRSX1JPXzA_"><span class="b">__ATTR_RO</span></a><span class="f">(</span><span class="b">_name</span><span class="f">)</span> <span class="f">{</span>                        \
<a name="79" /><span class="True">      79:</span>     <span class="f">.</span><span class="b">attr</span>    <span class="f">=</span> <span class="f">{</span> <span class="f">.</span><span class="b">name</span> <span class="f">=</span> <a href="cpu.c_macros_ref.html#_X19zdHJpbmdpZnlfMA__"><span class="b">__stringify</span></a><span class="f">(</span><span class="b">_name</span><span class="f">)</span><span class="f">,</span> <span class="f">.</span><span class="b">mode</span> <span class="f">=</span> <a href="cpu.c_macros_noref.html#_U19JUlVHT18w"><span class="b">S_IRUGO</span></a> <span class="f">}</span><span class="f">,</span>    \
<a name="80" /><span class="True">      80:</span>     <span class="f">.</span><span class="b">show</span>    <span class="f">=</span> <span class="b">_name</span><span class="f">##</span><span class="b">_show</span><span class="f">,</span>                        \
<a name="81" /><span class="True">      81:</span> <span class="f">}</span>
<a name="82" /><span class="True">      82:</span> 
<a name="83" /><span class="True">      83:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_X19BVFRSX1dPXzA_"><span class="b">__ATTR_WO</span></a><span class="f">(</span><span class="b">_name</span><span class="f">)</span> <span class="f">{</span>                        \
<a name="84" /><span class="True">      84:</span>     <span class="f">.</span><span class="b">attr</span>    <span class="f">=</span> <span class="f">{</span> <span class="f">.</span><span class="b">name</span> <span class="f">=</span> <a href="cpu.c_macros_ref.html#_X19zdHJpbmdpZnlfMA__"><span class="b">__stringify</span></a><span class="f">(</span><span class="b">_name</span><span class="f">)</span><span class="f">,</span> <span class="f">.</span><span class="b">mode</span> <span class="f">=</span> <a href="cpu.c_macros_noref.html#_U19JV1VTUl8w"><span class="b">S_IWUSR</span></a> <span class="f">}</span><span class="f">,</span>    \
<a name="85" /><span class="True">      85:</span>     <span class="f">.</span><span class="b">store</span>    <span class="f">=</span> <span class="b">_name</span><span class="f">##</span><span class="b">_store</span><span class="f">,</span>                    \
<a name="86" /><span class="True">      86:</span> <span class="f">}</span>
<a name="87" /><span class="True">      87:</span> 
<a name="88" /><span class="True">      88:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_X19BVFRSX1JXXzA_"><span class="b">__ATTR_RW</span></a><span class="f">(</span><span class="b">_name</span><span class="f">)</span> <a href="cpu.c_macros_noref.html#_X19BVFRSXzA_"><span class="b">__ATTR</span></a><span class="f">(</span><span class="b">_name</span><span class="f">,</span> <span class="f">(</span><a href="cpu.c_macros_noref.html#_U19JV1VTUl8w"><span class="b">S_IWUSR</span></a> <span class="f">|</span> <a href="cpu.c_macros_noref.html#_U19JUlVHT18w"><span class="b">S_IRUGO</span></a><span class="f">)</span><span class="f">,</span>        \
<a name="89" /><span class="True">      89:</span>              <span class="b">_name</span><span class="f">##</span><span class="b">_show</span><span class="f">,</span> <span class="b">_name</span><span class="f">##</span><span class="b">_store</span><span class="f">)</span>
<a name="90" /><span class="True">      90:</span> 
<a name="91" /><span class="True">      91:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_X19BVFRSX05VTExfMA__"><span class="b">__ATTR_NULL</span></a> <span class="f">{</span> <span class="f">.</span><span class="b">attr</span> <span class="f">=</span> <span class="f">{</span> <span class="f">.</span><span class="b">name</span> <span class="f">=</span> <a href="cpu.c_macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a> <span class="f">}</span> <span class="f">}</span>
<a name="92" /><span class="True">      92:</span> 
<a name="93" /><span class="False">      93:</span> <span class="f">#</span><span class="n">ifdef</span> <span class="b">CONFIG_DEBUG_LOCK_ALLOC</span>
<a name="94" /><span class="False">      94:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_X19BVFRSX0lHTk9SRV9MT0NLREVQXzA_"><span class="b">__ATTR_IGNORE_LOCKDEP</span></a><span class="f">(</span><span class="b">_name</span><span class="f">,</span> <span class="b">_mode</span><span class="f">,</span> <span class="b">_show</span><span class="f">,</span> <span class="b">_store</span><span class="f">)</span> <span class="f">{</span>    \
<a name="95" /><span class="False">      95:</span>     <span class="f">.</span><span class="b">attr</span> <span class="f">=</span> <span class="f">{</span><span class="f">.</span><span class="b">name</span> <span class="f">=</span> <a href="cpu.c_macros_ref.html#_X19zdHJpbmdpZnlfMA__"><span class="b">__stringify</span></a><span class="f">(</span><span class="b">_name</span><span class="f">)</span><span class="f">,</span> <span class="f">.</span><span class="b">mode</span> <span class="f">=</span> <span class="b">_mode</span><span class="f">,</span>    \
<a name="96" /><span class="False">      96:</span>             <span class="f">.</span><span class="b">ignore_lockdep</span> <span class="f">=</span> <span class="m">true</span> <span class="f">}</span><span class="f">,</span>        \
<a name="97" /><span class="False">      97:</span>     <span class="f">.</span><span class="b">show</span>        <span class="f">=</span> <span class="b">_show</span><span class="f">,</span>                \
<a name="98" /><span class="False">      98:</span>     <span class="f">.</span><span class="b">store</span>        <span class="f">=</span> <span class="b">_store</span><span class="f">,</span>                \
<a name="99" /><span class="False">      99:</span> <span class="f">}</span>
<a name="100" /><span class="True">     100:</span> <span class="f">#</span><span class="n">else</span>
<a name="101" /><span class="True">     101:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_X19BVFRSX0lHTk9SRV9MT0NLREVQXzA_"><span class="b">__ATTR_IGNORE_LOCKDEP</span></a>    <a href="cpu.c_macros_noref.html#_X19BVFRSXzA_"><span class="b">__ATTR</span></a>
<a name="102" /><span class="True">     102:</span> <span class="f">#</span><span class="n">endif</span>
<a name="103" /><span class="True">     103:</span> 
<a name="104" /><span class="True">     104:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_X19BVFRSSUJVVEVfR1JPVVBTXzA_"><span class="b">__ATTRIBUTE_GROUPS</span></a><span class="f">(</span><span class="b">_name</span><span class="f">)</span>                \
<a name="105" /><span class="True">     105:</span> <span class="m">static</span> <span class="m">const</span> <span class="m">struct</span> <span class="b">attribute_group</span> <span class="f">*</span><span class="b">_name</span><span class="f">##</span><span class="b">_groups</span><span class="f">[</span><span class="f">]</span> <span class="f">=</span> <span class="f">{</span>    \
<a name="106" /><span class="True">     106:</span>     <span class="f">&amp;</span><span class="b">_name</span><span class="f">##</span><span class="b">_group</span><span class="f">,</span>                        \
<a name="107" /><span class="True">     107:</span>     <a href="cpu.c_macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">,</span>                            \
<a name="108" /><span class="True">     108:</span> <span class="f">}</span>
<a name="109" /><span class="True">     109:</span> 
<a name="110" /><span class="True">     110:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_QVRUUklCVVRFX0dST1VQU18w"><span class="b">ATTRIBUTE_GROUPS</span></a><span class="f">(</span><span class="b">_name</span><span class="f">)</span>                    \
<a name="111" /><span class="True">     111:</span> <span class="m">static</span> <span class="m">const</span> <span class="m">struct</span> <span class="b">attribute_group</span> <span class="b">_name</span><span class="f">##</span><span class="b">_group</span> <span class="f">=</span> <span class="f">{</span>        \
<a name="112" /><span class="True">     112:</span>     <span class="f">.</span><span class="b">attrs</span> <span class="f">=</span> <span class="b">_name</span><span class="f">##</span><span class="b">_attrs</span><span class="f">,</span>                    \
<a name="113" /><span class="True">     113:</span> <span class="f">}</span><span class="f">;</span>                                \
<a name="114" /><span class="True">     114:</span> <a href="cpu.c_macros_noref.html#_X19BVFRSSUJVVEVfR1JPVVBTXzA_"><span class="b">__ATTRIBUTE_GROUPS</span></a><span class="f">(</span><span class="b">_name</span><span class="f">)</span>
<a name="115" /><span class="True">     115:</span> 
<a name="116" /><span class="True">     116:</span> <span class="m">struct</span> <span class="b">file</span><span class="f">;</span>
<a name="117" /><span class="True">     117:</span> <span class="m">struct</span> <span class="b">vm_area_struct</span><span class="f">;</span>
<a name="118" /><span class="True">     118:</span> 
<a name="119" /><span class="True">     119:</span> <span class="m">struct</span> <span class="b">bin_attribute</span> <span class="f">{</span>
<a name="120" /><span class="True">     120:</span>     <span class="m">struct</span> <span class="b">attribute</span>    <span class="b">attr</span><span class="f">;</span>
<a name="121" /><span class="True">     121:</span>     <span class="b">size_t</span>            <span class="b">size</span><span class="f">;</span>
<a name="122" /><span class="True">     122:</span>     <span class="m">void</span>            <span class="f">*</span><span class="m">private</span><span class="f">;</span>
<a name="123" /><span class="True">     123:</span>     <span class="b">ssize_t</span> <span class="f">(</span><span class="f">*</span><span class="b">read</span><span class="f">)</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">kobject</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">bin_attribute</span> <span class="f">*</span><span class="f">,</span>
<a name="124" /><span class="True">     124:</span>             <span class="m">char</span> <span class="f">*</span><span class="f">,</span> <span class="b">loff_t</span><span class="f">,</span> <span class="b">size_t</span><span class="f">)</span><span class="f">;</span>
<a name="125" /><span class="True">     125:</span>     <span class="b">ssize_t</span> <span class="f">(</span><span class="f">*</span><span class="b">write</span><span class="f">)</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">kobject</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">bin_attribute</span> <span class="f">*</span><span class="f">,</span>
<a name="126" /><span class="True">     126:</span>              <span class="m">char</span> <span class="f">*</span><span class="f">,</span> <span class="b">loff_t</span><span class="f">,</span> <span class="b">size_t</span><span class="f">)</span><span class="f">;</span>
<a name="127" /><span class="True">     127:</span>     <span class="m">int</span> <span class="f">(</span><span class="f">*</span><span class="b">mmap</span><span class="f">)</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">kobject</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">bin_attribute</span> <span class="f">*</span><span class="b">attr</span><span class="f">,</span>
<a name="128" /><span class="True">     128:</span>             <span class="m">struct</span> <span class="b">vm_area_struct</span> <span class="f">*</span><span class="b">vma</span><span class="f">)</span><span class="f">;</span>
<a name="129" /><span class="True">     129:</span> <span class="f">}</span><span class="f">;</span>
<a name="130" /><span class="True">     130:</span> 
<a name="131" /><span class="True">     131:</span> <span class="k">/**</span>
<a name="132" /><span class="True">     132:</span> <span class="k"> *    sysfs_bin_attr_init - initialize a dynamically allocated bin_attribute</span>
<a name="133" /><span class="True">     133:</span> <span class="k"> *    @attr: struct bin_attribute to initialize</span>
<a name="134" /><span class="True">     134:</span> <span class="k"> *</span>
<a name="135" /><span class="True">     135:</span> <span class="k"> *    Initialize a dynamically allocated struct bin_attribute so we</span>
<a name="136" /><span class="True">     136:</span> <span class="k"> *    can make lockdep happy.  This is a new requirement for</span>
<a name="137" /><span class="True">     137:</span> <span class="k"> *    attributes and initially this is only needed when lockdep is</span>
<a name="138" /><span class="True">     138:</span> <span class="k"> *    enabled.  Lockdep gives a nice error when your attribute is</span>
<a name="139" /><span class="True">     139:</span> <span class="k"> *    added to sysfs if you don&apos;t have this.</span>
<a name="140" /><span class="True">     140:</span> <span class="k"> */</span>
<a name="141" /><span class="True">     141:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_c3lzZnNfYmluX2F0dHJfaW5pdF8w"><span class="b">sysfs_bin_attr_init</span></a><span class="f">(</span><span class="b">bin_attr</span><span class="f">)</span> <a href="cpu.c_macros_noref.html#_c3lzZnNfYXR0cl9pbml0XzA_"><span class="b">sysfs_attr_init</span></a><span class="f">(</span><span class="f">&amp;</span><span class="f">(</span><span class="b">bin_attr</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">attr</span><span class="f">)</span>
<a name="142" /><span class="True">     142:</span> 
<a name="143" /><span class="True">     143:</span> <span class="k">/* macros to create static binary attributes easier */</span>
<a name="144" /><span class="True">     144:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_X19CSU5fQVRUUl8w"><span class="b">__BIN_ATTR</span></a><span class="f">(</span><span class="b">_name</span><span class="f">,</span> <span class="b">_mode</span><span class="f">,</span> <span class="b">_read</span><span class="f">,</span> <span class="b">_write</span><span class="f">,</span> <span class="b">_size</span><span class="f">)</span> <span class="f">{</span>        \
<a name="145" /><span class="True">     145:</span>     <span class="f">.</span><span class="b">attr</span> <span class="f">=</span> <span class="f">{</span> <span class="f">.</span><span class="b">name</span> <span class="f">=</span> <a href="cpu.c_macros_ref.html#_X19zdHJpbmdpZnlfMA__"><span class="b">__stringify</span></a><span class="f">(</span><span class="b">_name</span><span class="f">)</span><span class="f">,</span> <span class="f">.</span><span class="b">mode</span> <span class="f">=</span> <span class="b">_mode</span> <span class="f">}</span><span class="f">,</span>        \
<a name="146" /><span class="True">     146:</span>     <span class="f">.</span><span class="b">read</span>    <span class="f">=</span> <span class="b">_read</span><span class="f">,</span>                        \
<a name="147" /><span class="True">     147:</span>     <span class="f">.</span><span class="b">write</span>    <span class="f">=</span> <span class="b">_write</span><span class="f">,</span>                        \
<a name="148" /><span class="True">     148:</span>     <span class="f">.</span><span class="b">size</span>    <span class="f">=</span> <span class="b">_size</span><span class="f">,</span>                        \
<a name="149" /><span class="True">     149:</span> <span class="f">}</span>
<a name="150" /><span class="True">     150:</span> 
<a name="151" /><span class="True">     151:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_X19CSU5fQVRUUl9ST18w"><span class="b">__BIN_ATTR_RO</span></a><span class="f">(</span><span class="b">_name</span><span class="f">,</span> <span class="b">_size</span><span class="f">)</span> <span class="f">{</span>                    \
<a name="152" /><span class="True">     152:</span>     <span class="f">.</span><span class="b">attr</span>    <span class="f">=</span> <span class="f">{</span> <span class="f">.</span><span class="b">name</span> <span class="f">=</span> <a href="cpu.c_macros_ref.html#_X19zdHJpbmdpZnlfMA__"><span class="b">__stringify</span></a><span class="f">(</span><span class="b">_name</span><span class="f">)</span><span class="f">,</span> <span class="f">.</span><span class="b">mode</span> <span class="f">=</span> <a href="cpu.c_macros_noref.html#_U19JUlVHT18w"><span class="b">S_IRUGO</span></a> <span class="f">}</span><span class="f">,</span>    \
<a name="153" /><span class="True">     153:</span>     <span class="f">.</span><span class="b">read</span>    <span class="f">=</span> <span class="b">_name</span><span class="f">##</span><span class="b">_read</span><span class="f">,</span>                        \
<a name="154" /><span class="True">     154:</span>     <span class="f">.</span><span class="b">size</span>    <span class="f">=</span> <span class="b">_size</span><span class="f">,</span>                        \
<a name="155" /><span class="True">     155:</span> <span class="f">}</span>
<a name="156" /><span class="True">     156:</span> 
<a name="157" /><span class="True">     157:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_X19CSU5fQVRUUl9SV18w"><span class="b">__BIN_ATTR_RW</span></a><span class="f">(</span><span class="b">_name</span><span class="f">,</span> <span class="b">_size</span><span class="f">)</span> <a href="cpu.c_macros_noref.html#_X19CSU5fQVRUUl8w"><span class="b">__BIN_ATTR</span></a><span class="f">(</span><span class="b">_name</span><span class="f">,</span>            \
<a name="158" /><span class="True">     158:</span>                    <span class="f">(</span><a href="cpu.c_macros_noref.html#_U19JV1VTUl8w"><span class="b">S_IWUSR</span></a> <span class="f">|</span> <a href="cpu.c_macros_noref.html#_U19JUlVHT18w"><span class="b">S_IRUGO</span></a><span class="f">)</span><span class="f">,</span> <span class="b">_name</span><span class="f">##</span><span class="b">_read</span><span class="f">,</span>    \
<a name="159" /><span class="True">     159:</span>                    <span class="b">_name</span><span class="f">##</span><span class="b">_write</span><span class="f">,</span> <span class="b">_size</span><span class="f">)</span>
<a name="160" /><span class="True">     160:</span> 
<a name="161" /><span class="True">     161:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_X19CSU5fQVRUUl9OVUxMXzA_"><span class="b">__BIN_ATTR_NULL</span></a> <a href="cpu.c_macros_noref.html#_X19BVFRSX05VTExfMA__"><span class="b">__ATTR_NULL</span></a>
<a name="162" /><span class="True">     162:</span> 
<a name="163" /><span class="True">     163:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_QklOX0FUVFJfMA__"><span class="b">BIN_ATTR</span></a><span class="f">(</span><span class="b">_name</span><span class="f">,</span> <span class="b">_mode</span><span class="f">,</span> <span class="b">_read</span><span class="f">,</span> <span class="b">_write</span><span class="f">,</span> <span class="b">_size</span><span class="f">)</span>            \
<a name="164" /><span class="True">     164:</span> <span class="m">struct</span> <span class="b">bin_attribute</span> <span class="b">bin_attr_</span><span class="f">##</span><span class="b">_name</span> <span class="f">=</span> <a href="cpu.c_macros_noref.html#_X19CSU5fQVRUUl8w"><span class="b">__BIN_ATTR</span></a><span class="f">(</span><span class="b">_name</span><span class="f">,</span> <span class="b">_mode</span><span class="f">,</span> <span class="b">_read</span><span class="f">,</span>    \
<a name="165" /><span class="True">     165:</span>                     <span class="b">_write</span><span class="f">,</span> <span class="b">_size</span><span class="f">)</span>
<a name="166" /><span class="True">     166:</span> 
<a name="167" /><span class="True">     167:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_QklOX0FUVFJfUk9fMA__"><span class="b">BIN_ATTR_RO</span></a><span class="f">(</span><span class="b">_name</span><span class="f">,</span> <span class="b">_size</span><span class="f">)</span>                    \
<a name="168" /><span class="True">     168:</span> <span class="m">struct</span> <span class="b">bin_attribute</span> <span class="b">bin_attr_</span><span class="f">##</span><span class="b">_name</span> <span class="f">=</span> <a href="cpu.c_macros_noref.html#_X19CSU5fQVRUUl9ST18w"><span class="b">__BIN_ATTR_RO</span></a><span class="f">(</span><span class="b">_name</span><span class="f">,</span> <span class="b">_size</span><span class="f">)</span>
<a name="169" /><span class="True">     169:</span> 
<a name="170" /><span class="True">     170:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_QklOX0FUVFJfUldfMA__"><span class="b">BIN_ATTR_RW</span></a><span class="f">(</span><span class="b">_name</span><span class="f">,</span> <span class="b">_size</span><span class="f">)</span>                    \
<a name="171" /><span class="True">     171:</span> <span class="m">struct</span> <span class="b">bin_attribute</span> <span class="b">bin_attr_</span><span class="f">##</span><span class="b">_name</span> <span class="f">=</span> <a href="cpu.c_macros_noref.html#_X19CSU5fQVRUUl9SV18w"><span class="b">__BIN_ATTR_RW</span></a><span class="f">(</span><span class="b">_name</span><span class="f">,</span> <span class="b">_size</span><span class="f">)</span>
<a name="172" /><span class="True">     172:</span> 
<a name="173" /><span class="True">     173:</span> <span class="m">struct</span> <span class="b">sysfs_ops</span> <span class="f">{</span>
<a name="174" /><span class="True">     174:</span>     <span class="b">ssize_t</span>    <span class="f">(</span><span class="f">*</span><span class="b">show</span><span class="f">)</span><span class="f">(</span><span class="m">struct</span> <span class="b">kobject</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">attribute</span> <span class="f">*</span><span class="f">,</span> <span class="m">char</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="175" /><span class="True">     175:</span>     <span class="b">ssize_t</span>    <span class="f">(</span><span class="f">*</span><span class="b">store</span><span class="f">)</span><span class="f">(</span><span class="m">struct</span> <span class="b">kobject</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">attribute</span> <span class="f">*</span><span class="f">,</span> <span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="f">,</span> <span class="b">size_t</span><span class="f">)</span><span class="f">;</span>
<a name="176" /><span class="True">     176:</span> <span class="f">}</span><span class="f">;</span>
<a name="177" /><span class="True">     177:</span> 
<a name="178" /><span class="True">     178:</span> <span class="m">struct</span> <span class="b">sysfs_dirent</span><span class="f">;</span>
<a name="179" /><span class="True">     179:</span> 
<a name="180" /><span class="True">     180:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX1NZU0ZTXzA_"><span class="b">CONFIG_SYSFS</span></a>
<a name="181" /><span class="True">     181:</span> 
<a name="182" /><span class="True">     182:</span> <span class="m">int</span> <span class="b">sysfs_schedule_callback</span><span class="f">(</span><span class="m">struct</span> <span class="b">kobject</span> <span class="f">*</span><span class="b">kobj</span><span class="f">,</span> <span class="m">void</span> <span class="f">(</span><span class="f">*</span><span class="b">func</span><span class="f">)</span><span class="f">(</span><span class="m">void</span> <span class="f">*</span><span class="f">)</span><span class="f">,</span>
<a name="183" /><span class="True">     183:</span>                 <span class="m">void</span> <span class="f">*</span><span class="b">data</span><span class="f">,</span> <span class="m">struct</span> <span class="b">module</span> <span class="f">*</span><span class="b">owner</span><span class="f">)</span><span class="f">;</span>
<a name="184" /><span class="True">     184:</span> 
<a name="185" /><span class="True">     185:</span> <span class="m">int</span> <a href="cpu.c_macros_ref.html#_X19tdXN0X2NoZWNrXzE_"><span class="b">__must_check</span></a> <span class="b">sysfs_create_dir_ns</span><span class="f">(</span><span class="m">struct</span> <span class="b">kobject</span> <span class="f">*</span><span class="b">kobj</span><span class="f">,</span> <span class="m">const</span> <span class="m">void</span> <span class="f">*</span><span class="b">ns</span><span class="f">)</span><span class="f">;</span>
<a name="186" /><span class="True">     186:</span> <span class="m">void</span> <span class="b">sysfs_remove_dir</span><span class="f">(</span><span class="m">struct</span> <span class="b">kobject</span> <span class="f">*</span><span class="b">kobj</span><span class="f">)</span><span class="f">;</span>
<a name="187" /><span class="True">     187:</span> <span class="m">int</span> <a href="cpu.c_macros_ref.html#_X19tdXN0X2NoZWNrXzE_"><span class="b">__must_check</span></a> <span class="b">sysfs_rename_dir_ns</span><span class="f">(</span><span class="m">struct</span> <span class="b">kobject</span> <span class="f">*</span><span class="b">kobj</span><span class="f">,</span> <span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">new_name</span><span class="f">,</span>
<a name="188" /><span class="True">     188:</span>                      <span class="m">const</span> <span class="m">void</span> <span class="f">*</span><span class="b">new_ns</span><span class="f">)</span><span class="f">;</span>
<a name="189" /><span class="True">     189:</span> <span class="m">int</span> <a href="cpu.c_macros_ref.html#_X19tdXN0X2NoZWNrXzE_"><span class="b">__must_check</span></a> <span class="b">sysfs_move_dir_ns</span><span class="f">(</span><span class="m">struct</span> <span class="b">kobject</span> <span class="f">*</span><span class="b">kobj</span><span class="f">,</span>
<a name="190" /><span class="True">     190:</span>                    <span class="m">struct</span> <span class="b">kobject</span> <span class="f">*</span><span class="b">new_parent_kobj</span><span class="f">,</span>
<a name="191" /><span class="True">     191:</span>                    <span class="m">const</span> <span class="m">void</span> <span class="f">*</span><span class="b">new_ns</span><span class="f">)</span><span class="f">;</span>
<a name="192" /><span class="True">     192:</span> 
<a name="193" /><span class="True">     193:</span> <span class="m">int</span> <a href="cpu.c_macros_ref.html#_X19tdXN0X2NoZWNrXzE_"><span class="b">__must_check</span></a> <span class="b">sysfs_create_file_ns</span><span class="f">(</span><span class="m">struct</span> <span class="b">kobject</span> <span class="f">*</span><span class="b">kobj</span><span class="f">,</span>
<a name="194" /><span class="True">     194:</span>                       <span class="m">const</span> <span class="m">struct</span> <span class="b">attribute</span> <span class="f">*</span><span class="b">attr</span><span class="f">,</span>
<a name="195" /><span class="True">     195:</span>                       <span class="m">const</span> <span class="m">void</span> <span class="f">*</span><span class="b">ns</span><span class="f">)</span><span class="f">;</span>
<a name="196" /><span class="True">     196:</span> <span class="m">int</span> <a href="cpu.c_macros_ref.html#_X19tdXN0X2NoZWNrXzE_"><span class="b">__must_check</span></a> <span class="b">sysfs_create_files</span><span class="f">(</span><span class="m">struct</span> <span class="b">kobject</span> <span class="f">*</span><span class="b">kobj</span><span class="f">,</span>
<a name="197" /><span class="True">     197:</span>                    <span class="m">const</span> <span class="m">struct</span> <span class="b">attribute</span> <span class="f">*</span><span class="f">*</span><span class="b">attr</span><span class="f">)</span><span class="f">;</span>
<a name="198" /><span class="True">     198:</span> <span class="m">int</span> <a href="cpu.c_macros_ref.html#_X19tdXN0X2NoZWNrXzE_"><span class="b">__must_check</span></a> <span class="b">sysfs_chmod_file</span><span class="f">(</span><span class="m">struct</span> <span class="b">kobject</span> <span class="f">*</span><span class="b">kobj</span><span class="f">,</span>
<a name="199" /><span class="True">     199:</span>                   <span class="m">const</span> <span class="m">struct</span> <span class="b">attribute</span> <span class="f">*</span><span class="b">attr</span><span class="f">,</span> <span class="b">umode_t</span> <span class="b">mode</span><span class="f">)</span><span class="f">;</span>
<a name="200" /><span class="True">     200:</span> <span class="m">void</span> <span class="b">sysfs_remove_file_ns</span><span class="f">(</span><span class="m">struct</span> <span class="b">kobject</span> <span class="f">*</span><span class="b">kobj</span><span class="f">,</span> <span class="m">const</span> <span class="m">struct</span> <span class="b">attribute</span> <span class="f">*</span><span class="b">attr</span><span class="f">,</span>
<a name="201" /><span class="True">     201:</span>               <span class="m">const</span> <span class="m">void</span> <span class="f">*</span><span class="b">ns</span><span class="f">)</span><span class="f">;</span>
<a name="202" /><span class="True">     202:</span> <span class="m">void</span> <span class="b">sysfs_remove_files</span><span class="f">(</span><span class="m">struct</span> <span class="b">kobject</span> <span class="f">*</span><span class="b">kobj</span><span class="f">,</span> <span class="m">const</span> <span class="m">struct</span> <span class="b">attribute</span> <span class="f">*</span><span class="f">*</span><span class="b">attr</span><span class="f">)</span><span class="f">;</span>
<a name="203" /><span class="True">     203:</span> 
<a name="204" /><span class="True">     204:</span> <span class="m">int</span> <a href="cpu.c_macros_ref.html#_X19tdXN0X2NoZWNrXzE_"><span class="b">__must_check</span></a> <span class="b">sysfs_create_bin_file</span><span class="f">(</span><span class="m">struct</span> <span class="b">kobject</span> <span class="f">*</span><span class="b">kobj</span><span class="f">,</span>
<a name="205" /><span class="True">     205:</span>                        <span class="m">const</span> <span class="m">struct</span> <span class="b">bin_attribute</span> <span class="f">*</span><span class="b">attr</span><span class="f">)</span><span class="f">;</span>
<a name="206" /><span class="True">     206:</span> <span class="m">void</span> <span class="b">sysfs_remove_bin_file</span><span class="f">(</span><span class="m">struct</span> <span class="b">kobject</span> <span class="f">*</span><span class="b">kobj</span><span class="f">,</span>
<a name="207" /><span class="True">     207:</span>                <span class="m">const</span> <span class="m">struct</span> <span class="b">bin_attribute</span> <span class="f">*</span><span class="b">attr</span><span class="f">)</span><span class="f">;</span>
<a name="208" /><span class="True">     208:</span> 
<a name="209" /><span class="True">     209:</span> <span class="m">int</span> <a href="cpu.c_macros_ref.html#_X19tdXN0X2NoZWNrXzE_"><span class="b">__must_check</span></a> <span class="b">sysfs_create_link</span><span class="f">(</span><span class="m">struct</span> <span class="b">kobject</span> <span class="f">*</span><span class="b">kobj</span><span class="f">,</span> <span class="m">struct</span> <span class="b">kobject</span> <span class="f">*</span><span class="b">target</span><span class="f">,</span>
<a name="210" /><span class="True">     210:</span>                    <span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">name</span><span class="f">)</span><span class="f">;</span>
<a name="211" /><span class="True">     211:</span> <span class="m">int</span> <a href="cpu.c_macros_ref.html#_X19tdXN0X2NoZWNrXzE_"><span class="b">__must_check</span></a> <span class="b">sysfs_create_link_nowarn</span><span class="f">(</span><span class="m">struct</span> <span class="b">kobject</span> <span class="f">*</span><span class="b">kobj</span><span class="f">,</span>
<a name="212" /><span class="True">     212:</span>                       <span class="m">struct</span> <span class="b">kobject</span> <span class="f">*</span><span class="b">target</span><span class="f">,</span>
<a name="213" /><span class="True">     213:</span>                       <span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">name</span><span class="f">)</span><span class="f">;</span>
<a name="214" /><span class="True">     214:</span> <span class="m">void</span> <span class="b">sysfs_remove_link</span><span class="f">(</span><span class="m">struct</span> <span class="b">kobject</span> <span class="f">*</span><span class="b">kobj</span><span class="f">,</span> <span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">name</span><span class="f">)</span><span class="f">;</span>
<a name="215" /><span class="True">     215:</span> 
<a name="216" /><span class="True">     216:</span> <span class="m">int</span> <span class="b">sysfs_rename_link_ns</span><span class="f">(</span><span class="m">struct</span> <span class="b">kobject</span> <span class="f">*</span><span class="b">kobj</span><span class="f">,</span> <span class="m">struct</span> <span class="b">kobject</span> <span class="f">*</span><span class="b">target</span><span class="f">,</span>
<a name="217" /><span class="True">     217:</span>              <span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">old_name</span><span class="f">,</span> <span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">new_name</span><span class="f">,</span>
<a name="218" /><span class="True">     218:</span>              <span class="m">const</span> <span class="m">void</span> <span class="f">*</span><span class="b">new_ns</span><span class="f">)</span><span class="f">;</span>
<a name="219" /><span class="True">     219:</span> 
<a name="220" /><span class="True">     220:</span> <span class="m">void</span> <span class="b">sysfs_delete_link</span><span class="f">(</span><span class="m">struct</span> <span class="b">kobject</span> <span class="f">*</span><span class="b">dir</span><span class="f">,</span> <span class="m">struct</span> <span class="b">kobject</span> <span class="f">*</span><span class="b">targ</span><span class="f">,</span>
<a name="221" /><span class="True">     221:</span>             <span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">name</span><span class="f">)</span><span class="f">;</span>
<a name="222" /><span class="True">     222:</span> 
<a name="223" /><span class="True">     223:</span> <span class="m">int</span> <a href="cpu.c_macros_ref.html#_X19tdXN0X2NoZWNrXzE_"><span class="b">__must_check</span></a> <span class="b">sysfs_create_group</span><span class="f">(</span><span class="m">struct</span> <span class="b">kobject</span> <span class="f">*</span><span class="b">kobj</span><span class="f">,</span>
<a name="224" /><span class="True">     224:</span>                     <span class="m">const</span> <span class="m">struct</span> <span class="b">attribute_group</span> <span class="f">*</span><span class="b">grp</span><span class="f">)</span><span class="f">;</span>
<a name="225" /><span class="True">     225:</span> <span class="m">int</span> <a href="cpu.c_macros_ref.html#_X19tdXN0X2NoZWNrXzE_"><span class="b">__must_check</span></a> <span class="b">sysfs_create_groups</span><span class="f">(</span><span class="m">struct</span> <span class="b">kobject</span> <span class="f">*</span><span class="b">kobj</span><span class="f">,</span>
<a name="226" /><span class="True">     226:</span>                      <span class="m">const</span> <span class="m">struct</span> <span class="b">attribute_group</span> <span class="f">*</span><span class="f">*</span><span class="b">groups</span><span class="f">)</span><span class="f">;</span>
<a name="227" /><span class="True">     227:</span> <span class="m">int</span> <span class="b">sysfs_update_group</span><span class="f">(</span><span class="m">struct</span> <span class="b">kobject</span> <span class="f">*</span><span class="b">kobj</span><span class="f">,</span>
<a name="228" /><span class="True">     228:</span>                <span class="m">const</span> <span class="m">struct</span> <span class="b">attribute_group</span> <span class="f">*</span><span class="b">grp</span><span class="f">)</span><span class="f">;</span>
<a name="229" /><span class="True">     229:</span> <span class="m">void</span> <span class="b">sysfs_remove_group</span><span class="f">(</span><span class="m">struct</span> <span class="b">kobject</span> <span class="f">*</span><span class="b">kobj</span><span class="f">,</span>
<a name="230" /><span class="True">     230:</span>             <span class="m">const</span> <span class="m">struct</span> <span class="b">attribute_group</span> <span class="f">*</span><span class="b">grp</span><span class="f">)</span><span class="f">;</span>
<a name="231" /><span class="True">     231:</span> <span class="m">void</span> <span class="b">sysfs_remove_groups</span><span class="f">(</span><span class="m">struct</span> <span class="b">kobject</span> <span class="f">*</span><span class="b">kobj</span><span class="f">,</span>
<a name="232" /><span class="True">     232:</span>              <span class="m">const</span> <span class="m">struct</span> <span class="b">attribute_group</span> <span class="f">*</span><span class="f">*</span><span class="b">groups</span><span class="f">)</span><span class="f">;</span>
<a name="233" /><span class="True">     233:</span> <span class="m">int</span> <span class="b">sysfs_add_file_to_group</span><span class="f">(</span><span class="m">struct</span> <span class="b">kobject</span> <span class="f">*</span><span class="b">kobj</span><span class="f">,</span>
<a name="234" /><span class="True">     234:</span>             <span class="m">const</span> <span class="m">struct</span> <span class="b">attribute</span> <span class="f">*</span><span class="b">attr</span><span class="f">,</span> <span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">group</span><span class="f">)</span><span class="f">;</span>
<a name="235" /><span class="True">     235:</span> <span class="m">void</span> <span class="b">sysfs_remove_file_from_group</span><span class="f">(</span><span class="m">struct</span> <span class="b">kobject</span> <span class="f">*</span><span class="b">kobj</span><span class="f">,</span>
<a name="236" /><span class="True">     236:</span>             <span class="m">const</span> <span class="m">struct</span> <span class="b">attribute</span> <span class="f">*</span><span class="b">attr</span><span class="f">,</span> <span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">group</span><span class="f">)</span><span class="f">;</span>
<a name="237" /><span class="True">     237:</span> <span class="m">int</span> <span class="b">sysfs_merge_group</span><span class="f">(</span><span class="m">struct</span> <span class="b">kobject</span> <span class="f">*</span><span class="b">kobj</span><span class="f">,</span>
<a name="238" /><span class="True">     238:</span>                <span class="m">const</span> <span class="m">struct</span> <span class="b">attribute_group</span> <span class="f">*</span><span class="b">grp</span><span class="f">)</span><span class="f">;</span>
<a name="239" /><span class="True">     239:</span> <span class="m">void</span> <span class="b">sysfs_unmerge_group</span><span class="f">(</span><span class="m">struct</span> <span class="b">kobject</span> <span class="f">*</span><span class="b">kobj</span><span class="f">,</span>
<a name="240" /><span class="True">     240:</span>                <span class="m">const</span> <span class="m">struct</span> <span class="b">attribute_group</span> <span class="f">*</span><span class="b">grp</span><span class="f">)</span><span class="f">;</span>
<a name="241" /><span class="True">     241:</span> <span class="m">int</span> <span class="b">sysfs_add_link_to_group</span><span class="f">(</span><span class="m">struct</span> <span class="b">kobject</span> <span class="f">*</span><span class="b">kobj</span><span class="f">,</span> <span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">group_name</span><span class="f">,</span>
<a name="242" /><span class="True">     242:</span>                 <span class="m">struct</span> <span class="b">kobject</span> <span class="f">*</span><span class="b">target</span><span class="f">,</span> <span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">link_name</span><span class="f">)</span><span class="f">;</span>
<a name="243" /><span class="True">     243:</span> <span class="m">void</span> <span class="b">sysfs_remove_link_from_group</span><span class="f">(</span><span class="m">struct</span> <span class="b">kobject</span> <span class="f">*</span><span class="b">kobj</span><span class="f">,</span> <span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">group_name</span><span class="f">,</span>
<a name="244" /><span class="True">     244:</span>                   <span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">link_name</span><span class="f">)</span><span class="f">;</span>
<a name="245" /><span class="True">     245:</span> 
<a name="246" /><span class="True">     246:</span> <span class="m">void</span> <span class="b">sysfs_notify</span><span class="f">(</span><span class="m">struct</span> <span class="b">kobject</span> <span class="f">*</span><span class="b">kobj</span><span class="f">,</span> <span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">dir</span><span class="f">,</span> <span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">attr</span><span class="f">)</span><span class="f">;</span>
<a name="247" /><span class="True">     247:</span> <span class="m">void</span> <span class="b">sysfs_notify_dirent</span><span class="f">(</span><span class="m">struct</span> <span class="b">sysfs_dirent</span> <span class="f">*</span><span class="b">sd</span><span class="f">)</span><span class="f">;</span>
<a name="248" /><span class="True">     248:</span> <span class="m">struct</span> <span class="b">sysfs_dirent</span> <span class="f">*</span><span class="b">sysfs_get_dirent_ns</span><span class="f">(</span><span class="m">struct</span> <span class="b">sysfs_dirent</span> <span class="f">*</span><span class="b">parent_sd</span><span class="f">,</span>
<a name="249" /><span class="True">     249:</span>                      <span class="m">const</span> <span class="m">unsigned</span> <span class="m">char</span> <span class="f">*</span><span class="b">name</span><span class="f">,</span>
<a name="250" /><span class="True">     250:</span>                      <span class="m">const</span> <span class="m">void</span> <span class="f">*</span><span class="b">ns</span><span class="f">)</span><span class="f">;</span>
<a name="251" /><span class="True">     251:</span> <span class="m">struct</span> <span class="b">sysfs_dirent</span> <span class="f">*</span><span class="b">sysfs_get</span><span class="f">(</span><span class="m">struct</span> <span class="b">sysfs_dirent</span> <span class="f">*</span><span class="b">sd</span><span class="f">)</span><span class="f">;</span>
<a name="252" /><span class="True">     252:</span> <span class="m">void</span> <span class="b">sysfs_put</span><span class="f">(</span><span class="m">struct</span> <span class="b">sysfs_dirent</span> <span class="f">*</span><span class="b">sd</span><span class="f">)</span><span class="f">;</span>
<a name="253" /><span class="True">     253:</span> 
<a name="254" /><span class="True">     254:</span> <span class="m">int</span> <a href="cpu.c_macros_ref.html#_X19tdXN0X2NoZWNrXzE_"><span class="b">__must_check</span></a> <span class="b">sysfs_init</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="255" /><span class="True">     255:</span> 
<a name="256" /><span class="False">     256:</span> <span class="f">#</span><span class="n">else</span> <span class="k">/* CONFIG_SYSFS */</span>
<a name="257" /><span class="False">     257:</span> 
<a name="258" /><span class="False">     258:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">sysfs_schedule_callback</span><span class="f">(</span><span class="m">struct</span> <span class="b">kobject</span> <span class="f">*</span><span class="b">kobj</span><span class="f">,</span>
<a name="259" /><span class="False">     259:</span>         <span class="m">void</span> <span class="f">(</span><span class="f">*</span><span class="b">func</span><span class="f">)</span><span class="f">(</span><span class="m">void</span> <span class="f">*</span><span class="f">)</span><span class="f">,</span> <span class="m">void</span> <span class="f">*</span><span class="b">data</span><span class="f">,</span> <span class="m">struct</span> <span class="b">module</span> <span class="f">*</span><span class="b">owner</span><span class="f">)</span>
<a name="260" /><span class="False">     260:</span> <span class="f">{</span>
<a name="261" /><span class="False">     261:</span>     <span class="m">return</span> <span class="f">-</span><a href="cpu.c_macros_ref.html#_RU5PU1lTXzA_"><span class="b">ENOSYS</span></a><span class="f">;</span>
<a name="262" /><span class="False">     262:</span> <span class="f">}</span>
<a name="263" /><span class="False">     263:</span> 
<a name="264" /><span class="False">     264:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">sysfs_create_dir_ns</span><span class="f">(</span><span class="m">struct</span> <span class="b">kobject</span> <span class="f">*</span><span class="b">kobj</span><span class="f">,</span> <span class="m">const</span> <span class="m">void</span> <span class="f">*</span><span class="b">ns</span><span class="f">)</span>
<a name="265" /><span class="False">     265:</span> <span class="f">{</span>
<a name="266" /><span class="False">     266:</span>     <span class="m">return</span> <span class="c">0</span><span class="f">;</span>
<a name="267" /><span class="False">     267:</span> <span class="f">}</span>
<a name="268" /><span class="False">     268:</span> 
<a name="269" /><span class="False">     269:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">sysfs_remove_dir</span><span class="f">(</span><span class="m">struct</span> <span class="b">kobject</span> <span class="f">*</span><span class="b">kobj</span><span class="f">)</span>
<a name="270" /><span class="False">     270:</span> <span class="f">{</span>
<a name="271" /><span class="False">     271:</span> <span class="f">}</span>
<a name="272" /><span class="False">     272:</span> 
<a name="273" /><span class="False">     273:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">sysfs_rename_dir_ns</span><span class="f">(</span><span class="m">struct</span> <span class="b">kobject</span> <span class="f">*</span><span class="b">kobj</span><span class="f">,</span>
<a name="274" /><span class="False">     274:</span>                       <span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">new_name</span><span class="f">,</span> <span class="m">const</span> <span class="m">void</span> <span class="f">*</span><span class="b">new_ns</span><span class="f">)</span>
<a name="275" /><span class="False">     275:</span> <span class="f">{</span>
<a name="276" /><span class="False">     276:</span>     <span class="m">return</span> <span class="c">0</span><span class="f">;</span>
<a name="277" /><span class="False">     277:</span> <span class="f">}</span>
<a name="278" /><span class="False">     278:</span> 
<a name="279" /><span class="False">     279:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">sysfs_move_dir_ns</span><span class="f">(</span><span class="m">struct</span> <span class="b">kobject</span> <span class="f">*</span><span class="b">kobj</span><span class="f">,</span>
<a name="280" /><span class="False">     280:</span>                     <span class="m">struct</span> <span class="b">kobject</span> <span class="f">*</span><span class="b">new_parent_kobj</span><span class="f">,</span>
<a name="281" /><span class="False">     281:</span>                     <span class="m">const</span> <span class="m">void</span> <span class="f">*</span><span class="b">new_ns</span><span class="f">)</span>
<a name="282" /><span class="False">     282:</span> <span class="f">{</span>
<a name="283" /><span class="False">     283:</span>     <span class="m">return</span> <span class="c">0</span><span class="f">;</span>
<a name="284" /><span class="False">     284:</span> <span class="f">}</span>
<a name="285" /><span class="False">     285:</span> 
<a name="286" /><span class="False">     286:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">sysfs_create_file_ns</span><span class="f">(</span><span class="m">struct</span> <span class="b">kobject</span> <span class="f">*</span><span class="b">kobj</span><span class="f">,</span>
<a name="287" /><span class="False">     287:</span>                        <span class="m">const</span> <span class="m">struct</span> <span class="b">attribute</span> <span class="f">*</span><span class="b">attr</span><span class="f">,</span>
<a name="288" /><span class="False">     288:</span>                        <span class="m">const</span> <span class="m">void</span> <span class="f">*</span><span class="b">ns</span><span class="f">)</span>
<a name="289" /><span class="False">     289:</span> <span class="f">{</span>
<a name="290" /><span class="False">     290:</span>     <span class="m">return</span> <span class="c">0</span><span class="f">;</span>
<a name="291" /><span class="False">     291:</span> <span class="f">}</span>
<a name="292" /><span class="False">     292:</span> 
<a name="293" /><span class="False">     293:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">sysfs_create_files</span><span class="f">(</span><span class="m">struct</span> <span class="b">kobject</span> <span class="f">*</span><span class="b">kobj</span><span class="f">,</span>
<a name="294" /><span class="False">     294:</span>                     <span class="m">const</span> <span class="m">struct</span> <span class="b">attribute</span> <span class="f">*</span><span class="f">*</span><span class="b">attr</span><span class="f">)</span>
<a name="295" /><span class="False">     295:</span> <span class="f">{</span>
<a name="296" /><span class="False">     296:</span>     <span class="m">return</span> <span class="c">0</span><span class="f">;</span>
<a name="297" /><span class="False">     297:</span> <span class="f">}</span>
<a name="298" /><span class="False">     298:</span> 
<a name="299" /><span class="False">     299:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">sysfs_chmod_file</span><span class="f">(</span><span class="m">struct</span> <span class="b">kobject</span> <span class="f">*</span><span class="b">kobj</span><span class="f">,</span>
<a name="300" /><span class="False">     300:</span>                    <span class="m">const</span> <span class="m">struct</span> <span class="b">attribute</span> <span class="f">*</span><span class="b">attr</span><span class="f">,</span> <span class="b">umode_t</span> <span class="b">mode</span><span class="f">)</span>
<a name="301" /><span class="False">     301:</span> <span class="f">{</span>
<a name="302" /><span class="False">     302:</span>     <span class="m">return</span> <span class="c">0</span><span class="f">;</span>
<a name="303" /><span class="False">     303:</span> <span class="f">}</span>
<a name="304" /><span class="False">     304:</span> 
<a name="305" /><span class="False">     305:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">sysfs_remove_file_ns</span><span class="f">(</span><span class="m">struct</span> <span class="b">kobject</span> <span class="f">*</span><span class="b">kobj</span><span class="f">,</span>
<a name="306" /><span class="False">     306:</span>                     <span class="m">const</span> <span class="m">struct</span> <span class="b">attribute</span> <span class="f">*</span><span class="b">attr</span><span class="f">,</span>
<a name="307" /><span class="False">     307:</span>                     <span class="m">const</span> <span class="m">void</span> <span class="f">*</span><span class="b">ns</span><span class="f">)</span>
<a name="308" /><span class="False">     308:</span> <span class="f">{</span>
<a name="309" /><span class="False">     309:</span> <span class="f">}</span>
<a name="310" /><span class="False">     310:</span> 
<a name="311" /><span class="False">     311:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">sysfs_remove_files</span><span class="f">(</span><span class="m">struct</span> <span class="b">kobject</span> <span class="f">*</span><span class="b">kobj</span><span class="f">,</span>
<a name="312" /><span class="False">     312:</span>                      <span class="m">const</span> <span class="m">struct</span> <span class="b">attribute</span> <span class="f">*</span><span class="f">*</span><span class="b">attr</span><span class="f">)</span>
<a name="313" /><span class="False">     313:</span> <span class="f">{</span>
<a name="314" /><span class="False">     314:</span> <span class="f">}</span>
<a name="315" /><span class="False">     315:</span> 
<a name="316" /><span class="False">     316:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">sysfs_create_bin_file</span><span class="f">(</span><span class="m">struct</span> <span class="b">kobject</span> <span class="f">*</span><span class="b">kobj</span><span class="f">,</span>
<a name="317" /><span class="False">     317:</span>                     <span class="m">const</span> <span class="m">struct</span> <span class="b">bin_attribute</span> <span class="f">*</span><span class="b">attr</span><span class="f">)</span>
<a name="318" /><span class="False">     318:</span> <span class="f">{</span>
<a name="319" /><span class="False">     319:</span>     <span class="m">return</span> <span class="c">0</span><span class="f">;</span>
<a name="320" /><span class="False">     320:</span> <span class="f">}</span>
<a name="321" /><span class="False">     321:</span> 
<a name="322" /><span class="False">     322:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">sysfs_remove_bin_file</span><span class="f">(</span><span class="m">struct</span> <span class="b">kobject</span> <span class="f">*</span><span class="b">kobj</span><span class="f">,</span>
<a name="323" /><span class="False">     323:</span>                      <span class="m">const</span> <span class="m">struct</span> <span class="b">bin_attribute</span> <span class="f">*</span><span class="b">attr</span><span class="f">)</span>
<a name="324" /><span class="False">     324:</span> <span class="f">{</span>
<a name="325" /><span class="False">     325:</span> <span class="f">}</span>
<a name="326" /><span class="False">     326:</span> 
<a name="327" /><span class="False">     327:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">sysfs_create_link</span><span class="f">(</span><span class="m">struct</span> <span class="b">kobject</span> <span class="f">*</span><span class="b">kobj</span><span class="f">,</span>
<a name="328" /><span class="False">     328:</span>                     <span class="m">struct</span> <span class="b">kobject</span> <span class="f">*</span><span class="b">target</span><span class="f">,</span> <span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">name</span><span class="f">)</span>
<a name="329" /><span class="False">     329:</span> <span class="f">{</span>
<a name="330" /><span class="False">     330:</span>     <span class="m">return</span> <span class="c">0</span><span class="f">;</span>
<a name="331" /><span class="False">     331:</span> <span class="f">}</span>
<a name="332" /><span class="False">     332:</span> 
<a name="333" /><span class="False">     333:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">sysfs_create_link_nowarn</span><span class="f">(</span><span class="m">struct</span> <span class="b">kobject</span> <span class="f">*</span><span class="b">kobj</span><span class="f">,</span>
<a name="334" /><span class="False">     334:</span>                        <span class="m">struct</span> <span class="b">kobject</span> <span class="f">*</span><span class="b">target</span><span class="f">,</span>
<a name="335" /><span class="False">     335:</span>                        <span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">name</span><span class="f">)</span>
<a name="336" /><span class="False">     336:</span> <span class="f">{</span>
<a name="337" /><span class="False">     337:</span>     <span class="m">return</span> <span class="c">0</span><span class="f">;</span>
<a name="338" /><span class="False">     338:</span> <span class="f">}</span>
<a name="339" /><span class="False">     339:</span> 
<a name="340" /><span class="False">     340:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">sysfs_remove_link</span><span class="f">(</span><span class="m">struct</span> <span class="b">kobject</span> <span class="f">*</span><span class="b">kobj</span><span class="f">,</span> <span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">name</span><span class="f">)</span>
<a name="341" /><span class="False">     341:</span> <span class="f">{</span>
<a name="342" /><span class="False">     342:</span> <span class="f">}</span>
<a name="343" /><span class="False">     343:</span> 
<a name="344" /><span class="False">     344:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">sysfs_rename_link_ns</span><span class="f">(</span><span class="m">struct</span> <span class="b">kobject</span> <span class="f">*</span><span class="b">k</span><span class="f">,</span> <span class="m">struct</span> <span class="b">kobject</span> <span class="f">*</span><span class="b">t</span><span class="f">,</span>
<a name="345" /><span class="False">     345:</span>                        <span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">old_name</span><span class="f">,</span>
<a name="346" /><span class="False">     346:</span>                        <span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">new_name</span><span class="f">,</span> <span class="m">const</span> <span class="m">void</span> <span class="f">*</span><span class="b">ns</span><span class="f">)</span>
<a name="347" /><span class="False">     347:</span> <span class="f">{</span>
<a name="348" /><span class="False">     348:</span>     <span class="m">return</span> <span class="c">0</span><span class="f">;</span>
<a name="349" /><span class="False">     349:</span> <span class="f">}</span>
<a name="350" /><span class="False">     350:</span> 
<a name="351" /><span class="False">     351:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">sysfs_delete_link</span><span class="f">(</span><span class="m">struct</span> <span class="b">kobject</span> <span class="f">*</span><span class="b">k</span><span class="f">,</span> <span class="m">struct</span> <span class="b">kobject</span> <span class="f">*</span><span class="b">t</span><span class="f">,</span>
<a name="352" /><span class="False">     352:</span>                      <span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">name</span><span class="f">)</span>
<a name="353" /><span class="False">     353:</span> <span class="f">{</span>
<a name="354" /><span class="False">     354:</span> <span class="f">}</span>
<a name="355" /><span class="False">     355:</span> 
<a name="356" /><span class="False">     356:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">sysfs_create_group</span><span class="f">(</span><span class="m">struct</span> <span class="b">kobject</span> <span class="f">*</span><span class="b">kobj</span><span class="f">,</span>
<a name="357" /><span class="False">     357:</span>                      <span class="m">const</span> <span class="m">struct</span> <span class="b">attribute_group</span> <span class="f">*</span><span class="b">grp</span><span class="f">)</span>
<a name="358" /><span class="False">     358:</span> <span class="f">{</span>
<a name="359" /><span class="False">     359:</span>     <span class="m">return</span> <span class="c">0</span><span class="f">;</span>
<a name="360" /><span class="False">     360:</span> <span class="f">}</span>
<a name="361" /><span class="False">     361:</span> 
<a name="362" /><span class="False">     362:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">sysfs_create_groups</span><span class="f">(</span><span class="m">struct</span> <span class="b">kobject</span> <span class="f">*</span><span class="b">kobj</span><span class="f">,</span>
<a name="363" /><span class="False">     363:</span>                       <span class="m">const</span> <span class="m">struct</span> <span class="b">attribute_group</span> <span class="f">*</span><span class="f">*</span><span class="b">groups</span><span class="f">)</span>
<a name="364" /><span class="False">     364:</span> <span class="f">{</span>
<a name="365" /><span class="False">     365:</span>     <span class="m">return</span> <span class="c">0</span><span class="f">;</span>
<a name="366" /><span class="False">     366:</span> <span class="f">}</span>
<a name="367" /><span class="False">     367:</span> 
<a name="368" /><span class="False">     368:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">sysfs_update_group</span><span class="f">(</span><span class="m">struct</span> <span class="b">kobject</span> <span class="f">*</span><span class="b">kobj</span><span class="f">,</span>
<a name="369" /><span class="False">     369:</span>                 <span class="m">const</span> <span class="m">struct</span> <span class="b">attribute_group</span> <span class="f">*</span><span class="b">grp</span><span class="f">)</span>
<a name="370" /><span class="False">     370:</span> <span class="f">{</span>
<a name="371" /><span class="False">     371:</span>     <span class="m">return</span> <span class="c">0</span><span class="f">;</span>
<a name="372" /><span class="False">     372:</span> <span class="f">}</span>
<a name="373" /><span class="False">     373:</span> 
<a name="374" /><span class="False">     374:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">sysfs_remove_group</span><span class="f">(</span><span class="m">struct</span> <span class="b">kobject</span> <span class="f">*</span><span class="b">kobj</span><span class="f">,</span>
<a name="375" /><span class="False">     375:</span>                       <span class="m">const</span> <span class="m">struct</span> <span class="b">attribute_group</span> <span class="f">*</span><span class="b">grp</span><span class="f">)</span>
<a name="376" /><span class="False">     376:</span> <span class="f">{</span>
<a name="377" /><span class="False">     377:</span> <span class="f">}</span>
<a name="378" /><span class="False">     378:</span> 
<a name="379" /><span class="False">     379:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">sysfs_remove_groups</span><span class="f">(</span><span class="m">struct</span> <span class="b">kobject</span> <span class="f">*</span><span class="b">kobj</span><span class="f">,</span>
<a name="380" /><span class="False">     380:</span>                        <span class="m">const</span> <span class="m">struct</span> <span class="b">attribute_group</span> <span class="f">*</span><span class="f">*</span><span class="b">groups</span><span class="f">)</span>
<a name="381" /><span class="False">     381:</span> <span class="f">{</span>
<a name="382" /><span class="False">     382:</span> <span class="f">}</span>
<a name="383" /><span class="False">     383:</span> 
<a name="384" /><span class="False">     384:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">sysfs_add_file_to_group</span><span class="f">(</span><span class="m">struct</span> <span class="b">kobject</span> <span class="f">*</span><span class="b">kobj</span><span class="f">,</span>
<a name="385" /><span class="False">     385:</span>         <span class="m">const</span> <span class="m">struct</span> <span class="b">attribute</span> <span class="f">*</span><span class="b">attr</span><span class="f">,</span> <span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">group</span><span class="f">)</span>
<a name="386" /><span class="False">     386:</span> <span class="f">{</span>
<a name="387" /><span class="False">     387:</span>     <span class="m">return</span> <span class="c">0</span><span class="f">;</span>
<a name="388" /><span class="False">     388:</span> <span class="f">}</span>
<a name="389" /><span class="False">     389:</span> 
<a name="390" /><span class="False">     390:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">sysfs_remove_file_from_group</span><span class="f">(</span><span class="m">struct</span> <span class="b">kobject</span> <span class="f">*</span><span class="b">kobj</span><span class="f">,</span>
<a name="391" /><span class="False">     391:</span>         <span class="m">const</span> <span class="m">struct</span> <span class="b">attribute</span> <span class="f">*</span><span class="b">attr</span><span class="f">,</span> <span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">group</span><span class="f">)</span>
<a name="392" /><span class="False">     392:</span> <span class="f">{</span>
<a name="393" /><span class="False">     393:</span> <span class="f">}</span>
<a name="394" /><span class="False">     394:</span> 
<a name="395" /><span class="False">     395:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">sysfs_merge_group</span><span class="f">(</span><span class="m">struct</span> <span class="b">kobject</span> <span class="f">*</span><span class="b">kobj</span><span class="f">,</span>
<a name="396" /><span class="False">     396:</span>                <span class="m">const</span> <span class="m">struct</span> <span class="b">attribute_group</span> <span class="f">*</span><span class="b">grp</span><span class="f">)</span>
<a name="397" /><span class="False">     397:</span> <span class="f">{</span>
<a name="398" /><span class="False">     398:</span>     <span class="m">return</span> <span class="c">0</span><span class="f">;</span>
<a name="399" /><span class="False">     399:</span> <span class="f">}</span>
<a name="400" /><span class="False">     400:</span> 
<a name="401" /><span class="False">     401:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">sysfs_unmerge_group</span><span class="f">(</span><span class="m">struct</span> <span class="b">kobject</span> <span class="f">*</span><span class="b">kobj</span><span class="f">,</span>
<a name="402" /><span class="False">     402:</span>                <span class="m">const</span> <span class="m">struct</span> <span class="b">attribute_group</span> <span class="f">*</span><span class="b">grp</span><span class="f">)</span>
<a name="403" /><span class="False">     403:</span> <span class="f">{</span>
<a name="404" /><span class="False">     404:</span> <span class="f">}</span>
<a name="405" /><span class="False">     405:</span> 
<a name="406" /><span class="False">     406:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">sysfs_add_link_to_group</span><span class="f">(</span><span class="m">struct</span> <span class="b">kobject</span> <span class="f">*</span><span class="b">kobj</span><span class="f">,</span>
<a name="407" /><span class="False">     407:</span>         <span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">group_name</span><span class="f">,</span> <span class="m">struct</span> <span class="b">kobject</span> <span class="f">*</span><span class="b">target</span><span class="f">,</span>
<a name="408" /><span class="False">     408:</span>         <span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">link_name</span><span class="f">)</span>
<a name="409" /><span class="False">     409:</span> <span class="f">{</span>
<a name="410" /><span class="False">     410:</span>     <span class="m">return</span> <span class="c">0</span><span class="f">;</span>
<a name="411" /><span class="False">     411:</span> <span class="f">}</span>
<a name="412" /><span class="False">     412:</span> 
<a name="413" /><span class="False">     413:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">sysfs_remove_link_from_group</span><span class="f">(</span><span class="m">struct</span> <span class="b">kobject</span> <span class="f">*</span><span class="b">kobj</span><span class="f">,</span>
<a name="414" /><span class="False">     414:</span>         <span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">group_name</span><span class="f">,</span> <span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">link_name</span><span class="f">)</span>
<a name="415" /><span class="False">     415:</span> <span class="f">{</span>
<a name="416" /><span class="False">     416:</span> <span class="f">}</span>
<a name="417" /><span class="False">     417:</span> 
<a name="418" /><span class="False">     418:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">sysfs_notify</span><span class="f">(</span><span class="m">struct</span> <span class="b">kobject</span> <span class="f">*</span><span class="b">kobj</span><span class="f">,</span> <span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">dir</span><span class="f">,</span>
<a name="419" /><span class="False">     419:</span>                 <span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">attr</span><span class="f">)</span>
<a name="420" /><span class="False">     420:</span> <span class="f">{</span>
<a name="421" /><span class="False">     421:</span> <span class="f">}</span>
<a name="422" /><span class="False">     422:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">sysfs_notify_dirent</span><span class="f">(</span><span class="m">struct</span> <span class="b">sysfs_dirent</span> <span class="f">*</span><span class="b">sd</span><span class="f">)</span>
<a name="423" /><span class="False">     423:</span> <span class="f">{</span>
<a name="424" /><span class="False">     424:</span> <span class="f">}</span>
<a name="425" /><span class="False">     425:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">struct</span> <span class="b">sysfs_dirent</span> <span class="f">*</span>
<a name="426" /><span class="False">     426:</span> <span class="b">sysfs_get_dirent_ns</span><span class="f">(</span><span class="m">struct</span> <span class="b">sysfs_dirent</span> <span class="f">*</span><span class="b">parent_sd</span><span class="f">,</span> <span class="m">const</span> <span class="m">unsigned</span> <span class="m">char</span> <span class="f">*</span><span class="b">name</span><span class="f">,</span>
<a name="427" /><span class="False">     427:</span>             <span class="m">const</span> <span class="m">void</span> <span class="f">*</span><span class="b">ns</span><span class="f">)</span>
<a name="428" /><span class="False">     428:</span> <span class="f">{</span>
<a name="429" /><span class="False">     429:</span>     <span class="m">return</span> <a href="cpu.c_macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="430" /><span class="False">     430:</span> <span class="f">}</span>
<a name="431" /><span class="False">     431:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">struct</span> <span class="b">sysfs_dirent</span> <span class="f">*</span><span class="b">sysfs_get</span><span class="f">(</span><span class="m">struct</span> <span class="b">sysfs_dirent</span> <span class="f">*</span><span class="b">sd</span><span class="f">)</span>
<a name="432" /><span class="False">     432:</span> <span class="f">{</span>
<a name="433" /><span class="False">     433:</span>     <span class="m">return</span> <a href="cpu.c_macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="434" /><span class="False">     434:</span> <span class="f">}</span>
<a name="435" /><span class="False">     435:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">sysfs_put</span><span class="f">(</span><span class="m">struct</span> <span class="b">sysfs_dirent</span> <span class="f">*</span><span class="b">sd</span><span class="f">)</span>
<a name="436" /><span class="False">     436:</span> <span class="f">{</span>
<a name="437" /><span class="False">     437:</span> <span class="f">}</span>
<a name="438" /><span class="False">     438:</span> 
<a name="439" /><span class="False">     439:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <a href="cpu.c_macros_ref.html#_X19tdXN0X2NoZWNrXzE_"><span class="b">__must_check</span></a> <span class="b">sysfs_init</span><span class="f">(</span><span class="m">void</span><span class="f">)</span>
<a name="440" /><span class="False">     440:</span> <span class="f">{</span>
<a name="441" /><span class="False">     441:</span>     <span class="m">return</span> <span class="c">0</span><span class="f">;</span>
<a name="442" /><span class="False">     442:</span> <span class="f">}</span>
<a name="443" /><span class="False">     443:</span> 
<a name="444" /><span class="True">     444:</span> <span class="f">#</span><span class="n">endif</span> <span class="k">/* CONFIG_SYSFS */</span>
<a name="445" /><span class="True">     445:</span> 
<a name="446" /><span class="True">     446:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <a href="cpu.c_macros_ref.html#_X19tdXN0X2NoZWNrXzE_"><span class="b">__must_check</span></a> <span class="b">sysfs_create_file</span><span class="f">(</span><span class="m">struct</span> <span class="b">kobject</span> <span class="f">*</span><span class="b">kobj</span><span class="f">,</span>
<a name="447" /><span class="True">     447:</span>                          <span class="m">const</span> <span class="m">struct</span> <span class="b">attribute</span> <span class="f">*</span><span class="b">attr</span><span class="f">)</span>
<a name="448" /><span class="True">     448:</span> <span class="f">{</span>
<a name="449" /><span class="True">     449:</span>     <span class="m">return</span> <span class="b">sysfs_create_file_ns</span><span class="f">(</span><span class="b">kobj</span><span class="f">,</span> <span class="b">attr</span><span class="f">,</span> <a href="cpu.c_macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span><span class="f">;</span>
<a name="450" /><span class="True">     450:</span> <span class="f">}</span>
<a name="451" /><span class="True">     451:</span> 
<a name="452" /><span class="True">     452:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">sysfs_remove_file</span><span class="f">(</span><span class="m">struct</span> <span class="b">kobject</span> <span class="f">*</span><span class="b">kobj</span><span class="f">,</span>
<a name="453" /><span class="True">     453:</span>                      <span class="m">const</span> <span class="m">struct</span> <span class="b">attribute</span> <span class="f">*</span><span class="b">attr</span><span class="f">)</span>
<a name="454" /><span class="True">     454:</span> <span class="f">{</span>
<a name="455" /><span class="True">     455:</span>     <span class="m">return</span> <span class="b">sysfs_remove_file_ns</span><span class="f">(</span><span class="b">kobj</span><span class="f">,</span> <span class="b">attr</span><span class="f">,</span> <a href="cpu.c_macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span><span class="f">;</span>
<a name="456" /><span class="True">     456:</span> <span class="f">}</span>
<a name="457" /><span class="True">     457:</span> 
<a name="458" /><span class="True">     458:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">sysfs_rename_link</span><span class="f">(</span><span class="m">struct</span> <span class="b">kobject</span> <span class="f">*</span><span class="b">kobj</span><span class="f">,</span> <span class="m">struct</span> <span class="b">kobject</span> <span class="f">*</span><span class="b">target</span><span class="f">,</span>
<a name="459" /><span class="True">     459:</span>                     <span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">old_name</span><span class="f">,</span> <span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">new_name</span><span class="f">)</span>
<a name="460" /><span class="True">     460:</span> <span class="f">{</span>
<a name="461" /><span class="True">     461:</span>     <span class="m">return</span> <span class="b">sysfs_rename_link_ns</span><span class="f">(</span><span class="b">kobj</span><span class="f">,</span> <span class="b">target</span><span class="f">,</span> <span class="b">old_name</span><span class="f">,</span> <span class="b">new_name</span><span class="f">,</span> <a href="cpu.c_macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span><span class="f">;</span>
<a name="462" /><span class="True">     462:</span> <span class="f">}</span>
<a name="463" /><span class="True">     463:</span> 
<a name="464" /><span class="True">     464:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">struct</span> <span class="b">sysfs_dirent</span> <span class="f">*</span>
<a name="465" /><span class="True">     465:</span> <span class="b">sysfs_get_dirent</span><span class="f">(</span><span class="m">struct</span> <span class="b">sysfs_dirent</span> <span class="f">*</span><span class="b">parent_sd</span><span class="f">,</span> <span class="m">const</span> <span class="m">unsigned</span> <span class="m">char</span> <span class="f">*</span><span class="b">name</span><span class="f">)</span>
<a name="466" /><span class="True">     466:</span> <span class="f">{</span>
<a name="467" /><span class="True">     467:</span>     <span class="m">return</span> <span class="b">sysfs_get_dirent_ns</span><span class="f">(</span><span class="b">parent_sd</span><span class="f">,</span> <span class="b">name</span><span class="f">,</span> <a href="cpu.c_macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span><span class="f">;</span>
<a name="468" /><span class="True">     468:</span> <span class="f">}</span>
<a name="469" /><span class="True">     469:</span> 
<a name="470" /><span class="True">     470:</span> <span class="f">#</span><span class="n">endif</span> <span class="k">/* _SYSFS_H_ */</span>
<a name="471" /><span class="True">     471:</span> </pre>
  </body>
</html>
